Page blanche "error"

Réduire
X
 
  • Filtrer
  • Heure
  • Afficher
Tout effacer
nouveaux messages

  • #16
    Voilà ce qu'il y a dans le XML

    Code:
    <?xml version="1.0" encoding="utf-8"?><extension version="3" type="plugin" group="content" method="upgrade"><name>Content - Adsinside</name><creationDate>02/02/2017</creationDate><author>Sandro</author><authorEmail>sandro@actiaweb.com</authorEmail><authorUrl>http://www.actiaweb.com/</authorUrl><copyright>Copyright 2018</copyright><license>License, for example GNU/GPL</license><version>5.2</version><description>ads content inside</description><files>    <filename plugin="adsinside">adsinside.php</filename>    <filename>index.html</filename>        <folder>language</folder></files><languages>    <language tag="en-GB">language/en-GB.plg_content_adsinside.ini</language>    <language tag="fr-FR">language/fr-FR.plg_content_adsinside.ini</language></languages><config>    <fields name="params">        <fieldset name="basic">            <field name="adsense_top" type="textarea" rows="15" cols="8" filter="raw"                description="PLG_ADSINSIDE_TOP"                label="PLG_ADSINSIDE_TOP"            />            <field name="adsense_bottom" type="textarea" rows="15" cols="8" filter="raw"                description="PLG_ADSINSIDE_BOTTOM"                label="PLG_ADSINSIDE_BOTTOM"            />            <field name="adsense1" type="textarea" rows="15" cols="8" filter="raw"                description="PLG_ADSINSIDE_MIDDLE1"                label="PLG_ADSINSIDE_MIDDLE1"            />            <field name="where1" type="number" min="0" max="30" step="1"                description="PLG_ADSINSIDE_WHERE1"                label="PLG_ADSINSIDE_WHERE1"            />            <field name="adsense2" type="textarea" rows="15" cols="8" filter="raw"                description="PLG_ADSINSIDE_MIDDLE2"                label="PLG_ADSINSIDE_MIDDLE2"            />            <field name="where2" type="number" min="0" max="30" step="1"                description="PLG_ADSINSIDE_WHERE2"                label="PLG_ADSINSIDE_WHERE2"            />            <field name="adsense3" type="textarea" rows="15" cols="8" filter="raw"                description="PLG_ADSINSIDE_MIDDLE3"                label="PLG_ADSINSIDE_MIDDLE3"            />            <field name="where3" type="number" min="0" max="30" step="1"                description="PLG_ADSINSIDE_WHERE3"                label="PLG_ADSINSIDE_WHERE3"            />            <field name="what" type="list" default="1" label="PLG_ADSINSIDE_WHAT" description="PLG_ADSINSIDE_WHAT">              <option value="0">PLG_ADSINSIDE_DISABLE</option>              <option value="1">PLG_ADSINSIDE_ENABLE</option>            </field>            <field name="float" type="list" default="center" label="PLG_ADSINSIDE_FLOAT" description="PLG_ADSINSIDE_FLOAT">              <option value="left">PLG_ADSINSIDE_LEFT</option>              <option value="center">PLG_ADSINSIDE_CENTER</option>              <option value="right">PLG_ADSINSIDE_RIGHT</option>            </field>            <field name="margin" type="number" min="0" max="30" step="1"                description="PLG_ADSINSIDE_MARGIN"                label="PLG_ADSINSIDE_MARGIN"            />            <field name="category" type="textarea" rows="15" cols="8" filter="raw"                description="PLG_ADSINSIDE_CATEGORY"                label="PLG_ADSINSIDE_CATEGORY"            />            <field name="articleid" type="textarea" rows="15" cols="8" filter="raw"                description="PLG_ADSINSIDE_ARTICLE"                label="PLG_ADSINSIDE_ARTICLE"            />        </fieldset>    </fields></config><updateservers>    <server type="extension" name="adsinside update">http://www.actiaweb.com/activ/phocadownload/content-adsinside/manifest.xml</server></updateservers></extension>
    Je me demande si ce n'est pas mes pubs adsense en fait, d'ailleurs tout fonctionne sur le site sauf l'affichage un peu bancal de mes articles où les pubs google sont présentes
    Dernière édition par atmorisk à 10/12/2018, 23h33

    Commentaire


    • #17
      Et le fichier adsinside.php me parait totalement désordonné !

      Code:
      <?php/** * @package     Joomla.Plugin * @subpackage  Content.adsinside * * [USER="64686"]Copyright[/USER]   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license     Licensed under the GPL v2& */defined('_JEXEC') or die;/** * Adsinside plugin class. * */class PlgContentAdsinside extends JPlugin{    /**     * Displays the ads inside joomla articles     *     * @param   string   $context  The context of the content being passed to the plugin     * @param   object   &$row     The article object     * @param   object   &$params  The article params     * @param   integer  $page     The 'page' number     *     * @return  mixed  html string containing code for the votes if in com_content else boolean false     *     * [USER="57695"]since[/USER]   1.6     */    protected $autoloadLanguage = true;            public function onContentAfterDisplay($context, &$article, &$params, $limitstart = 0)    {        $app   = JFactory::getApplication();        $view  = $app->input->get('view');        $print = $app->input->getBool('print');        if(empty($this->params["category"]))     {$category          = '';}else{$category     = $this->params["category"];}        if(empty($this->params["articleid"]))     {$articleid          = '';}else{$articleid     = $this->params["articleid"];}                if ($print)        {            return false;        }        if (($context == 'com_content.article') && ($view == 'article') && (substr_count($article->text, '{adsinside no bottom}') == 0))        {            $HiddenArticles = explode(',', $articleid);            $db = JFactory::getDBO();             $option   = JRequest::getCmd('option');            $temp   = JRequest::getString('id');            $temp   = explode(':', $temp);            $id   = $temp[0];            $db->setQuery('SELECT cat.id FROM #__categories cat RIGHT JOIN #__content cont ON cat.id = cont.catid WHERE cont.id='.$id);               $categoryId = $db->loadResult(); //this is current article’s category ID            $HiddenProducts = explode(',',$category);                        if (in_array($categoryId, $HiddenProducts) || in_array($article->id, $HiddenArticles)) {            }            else            {                if(empty($this->params["adsense_bottom"]))                {                    $adsense_bottom          = '';                }                else                {                        $adsense_bottom     = $this->params["adsense_bottom"];                        $article->text = $article->text . $adsense_bottom;                }            }        }        $article->text = str_replace("{adsinside no bottom}", "", $article->text);        return;    }        public function onContentBeforeDisplay($context, &$article, &$params, $limitstart = 0)    {        $app   = JFactory::getApplication();        $view  = $app->input->get('view');        $print = $app->input->getBool('print');        if(empty($this->params["category"]))     {$category          = '';}else{$category     = $this->params["category"];}        if(empty($this->params["articleid"]))     {$articleid          = '';}else{$articleid     = $this->params["articleid"];}                if ($print)        {            return false;        }        if (($context == 'com_content.article') && ($view == 'article') && substr_count($article->text, '{adsinside no top}') == 0)        {            $HiddenArticles = explode(',', $articleid);            $db = JFactory::getDBO();             $option   = JRequest::getCmd('option');            $temp   = JRequest::getString('id');            $temp   = explode(':', $temp);            $id   = $temp[0];            $db->setQuery('SELECT cat.id FROM #__categories cat RIGHT JOIN #__content cont ON cat.id = cont.catid WHERE cont.id='.$id);               $categoryId = $db->loadResult(); //this is current article’s category ID            $HiddenProducts = explode(',',$category);                        if (in_array($categoryId, $HiddenProducts) || in_array($article->id, $HiddenArticles)) {            }            else            {                if(empty($this->params["adsense_top"]) && !substr_count($article->text, '{adsinside no}') == 0)                {                    $adsense_top          = '';                }                else                {                        $adsense_top     = $this->params["adsense_top"];                        $article->text = $adsense_top . $article->text;                }            }        }        $article->text = str_replace("{adsinside no top}", "", $article->text);        return;    }        public function onContentPrepare($context, &$article, &$params, $limitstart = 0)    {        $app   = JFactory::getApplication();        $view  = $app->input->get('view');        $print = $app->input->getBool('print');        if(empty($this->params["category"]))     {$category          = '';}else{$category     = $this->params["category"];}        if(empty($this->params["articleid"]))     {$articleid          = '';}else{$articleid     = $this->params["articleid"];}        //$categoryId = JRequest::getVar('catid');                //var_dump($article);        //$articleId = $article->id;        //if(numberInList($categoryId, $category) == 1){                                     if ($print)            {                return false;            }            if (($context == 'com_content.article') && ($view == 'article')  && substr_count($article->text, '{adsinside no center}') == 0)            {                $HiddenArticles = explode(',', $articleid);                $db = JFactory::getDBO();                 $option   = JRequest::getCmd('option');                $temp   = JRequest::getString('id');                $temp   = explode(':', $temp);                $id   = $temp[0];                $db->setQuery('SELECT cat.id FROM #__categories cat RIGHT JOIN #__content cont ON cat.id = cont.catid WHERE cont.id='.$id);                   $categoryId = $db->loadResult(); //this is current article’s category ID                $HiddenProducts = explode(',',$category);                                if (in_array($categoryId, $HiddenProducts) || in_array($article->id, $HiddenArticles)) {                }                else                {                                    if(empty($this->params["adsense1"]))                    {                        $adsense1          = '';                    }                    else                    {                        if(empty($this->params["what"]))     {$what          = '';}else{$what     = $this->params["what"];}                        if(empty($this->params["where1"]))     {$where          = '';}else{$where1     = $this->params["where1"];}                        if(empty($this->params["float"]))     {$float          = '';}else{$float     = $this->params["float"];}                        if(empty($this->params["margin"]))     {$margin          = '';}else{$margin     = $this->params["margin"];}                        //$test = substr_count($article->text, '<p>');                        //$test .=  ' > ' . $where1;                        if( ( substr_count($article->text, '<p>') > $where1 || $what == 1 )){                            if($float == "left" || $float == "right"){                                $style = "style='float:" . $float . ";margin:" . $margin . "px;'>";                            }                            if($float == "center"){                                $style = "style='margin-left:auto;margin-right:auto;text-align:center;'>";                            }                            $adsense1     = $this->params["adsense1"];                            $mon_contenu_table = explode('<p>', $article->text);                            $mon_contenu_table[$where1] .= "<div " . $style . $adsense1 . "</div>";                            $article->text = implode($mon_contenu_table, "<p>");                        }                    }                                if(empty($this->params["adsense2"]))                    {                        $adsense2          = '';                    }                    else                    {                        if(empty($this->params["what"]))     {$what          = '';}else{$what     = $this->params["what"];}                        if(empty($this->params["where2"]))     {$where          = '';}else{$where2     = $this->params["where2"];}                        if(empty($this->params["float"]))     {$float          = '';}else{$float     = $this->params["float"];}                        if(empty($this->params["margin"]))     {$margin          = '';}else{$margin     = $this->params["margin"];}                        // echo substr_count($article->text, '<p>');                        // echo ' > ' . $where;                        if( ( substr_count($article->text, '<p>') > $where2 || $what == 1 )){                            if($float == "left" || $float == "right"){                                $style = "style='float:" . $float . ";margin:" . $margin . "px;'>";                            }                            if($float == "center"){                                $style = "style='margin-left:auto;margin-right:auto;text-align:center;'>";                            }                            $adsense2     = $this->params["adsense2"];                            $mon_contenu_table = explode('<p>', $article->text);                            $mon_contenu_table[$where2] .= "<div " . $style . $adsense2 . "</div>";                            $article->text = implode($mon_contenu_table, "<p>");                        }                    }                    if(empty($this->params["adsense3"]))                    {                        $adsense3          = '';                    }                    else                    {                        if(empty($this->params["what"]))     {$what          = '';}else{$what     = $this->params["what"];}                        if(empty($this->params["where3"]))     {$where          = '';}else{$where3     = $this->params["where3"];}                        if(empty($this->params["float"]))     {$float          = '';}else{$float     = $this->params["float"];}                        if(empty($this->params["margin"]))     {$margin          = '';}else{$margin     = $this->params["margin"];}                        // echo substr_count($article->text, '<p>');                        // echo ' > ' . $where;                        if( ( substr_count($article->text, '<p>') > $where3 || $what == 1 )){                            if($float == "left" || $float == "right"){                                $style = "style='float:" . $float . ";margin:" . $margin . "px;'>";                            }                            if($float == "center"){                                $style = "style='margin-left:auto;margin-right:auto;text-align:center;'>";                            }                            $adsense3     = $this->params["adsense3"];                            $mon_contenu_table = explode('<p>', $article->text);                            $mon_contenu_table[$where3] .= "<div " . $style . $adsense3 . "</div>";                            $article->text = implode($mon_contenu_table, "<p>");                        }                    }                            }            }            $article->text = str_replace("{adsinside no center}", "", $article->text);            return;        //}    }        }
      Sacré bordel, faudrait tout réécrire non? :S

      Commentaire


      • #18
        Ne touche aucunement au code PHP si tu ne sais pas ce que tu fais.

        AdsInside est donc un plugin Joomla écrit par Sandro (tout est écrit dans le fichier .xml). Le plugin est téléchargeable ici : https://extensions.joomla.org/extension/adsinside/ (simple recherche Google).

        Maintenant si tu as identifié que, si le plugin n'est plus actif ton site fonctionne et s'il est actif il ne fonctionne plus, rapproche toi du développeur (voir lien que j'ai donné ci-dessus) et communique-lui ta version de Joomla, de PHP, la version du plugin incriminé et l'erreur rencontrée (0 syntax error, unexpected 'defined' (T_STRING) )

        (Si tu regardes le fichier .xml, tu verras que l'email du développeur s'y trouve)

        Bonne nuit.

        Christophe (cavo789)
        Mon blog, on y parle Docker, PHP, WSL, Markdown et plein d'autres choses : https://www.avonture.be
        Logiciel gratuit de scan antivirus : https://github.com/cavo789/aesecure_quickscan (plus de 45.000 virus détectés, 700.000 fichiers sur liste blanche)​

        Commentaire

        Annonce

        Réduire
        Aucune annonce pour le moment.

        Partenaire de l'association

        Réduire

        Hébergeur Web PlanetHoster
        Travaille ...
        X